<!DOCTYPE html>
<html>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="expires" content="0" />
<title>-</title>
<style type="text/css">
  html,
  body {
    margin: 0px;
    height: 100%;
    width: 100%;
  }

  /*地图容器*/
  .container {
    width: 100%;
    height: 100%;
  }
</style>
<script type="text/javascript" src="http://43.240.0.158:8080/examples/lib/jquery.min.js"></script>
<link rel="stylesheet" href="http://43.240.0.158:8080/examples/layui/css/layui.css">
<script>
  document.write('<script type="text/javascript" src="/examples/lib/common.js?version=' + Math.random() + '"><\/script>');
</script>

<script type="text/javascript" src="http://43.240.0.158:8080/examples/layui/layui.js"></script>
<script id="apiScript" type="text/javascript">
  pz();
  document.write('<script type="text/javascript" src=\'' + propertiesMap.apiUrl + "'><\/script>");
</script>

<body>
  <html>

  <head></head>

  <body>
    <!--装地图容器-->
    <div id="map" class="container"></div>
  </body>

  </html>

  <script>
    var BNMap = null;
    var bnSymbol = null;
    var graphicsLayer;
    var BNmapUtil;
    require(["js/BNSymbol", "js/BNUtil", "js/BNFactory", "js/BNDirectorys", "js/jquery-3.2.1.min"],
      function (BNSymbol, util, BNFactory, BNDirectorys) {
        // 获取坐标
        var x = propertiesMap.x;
        var y = propertiesMap.y;
        // 获取地图id
        var mapId = propertiesMap.mapId01;
        // 拿到浏览器高度
        var Windowheight = $(window).height();
        // 创建符号
        bnSymbol = new BNSymbol();
        // 从新定义地图高度
        $("#map").height(Windowheight);
        // 叠加图层时，需要在共享地理信息平台上组合专题图，组合完毕使用组合的专题图id加载地图
        BNMap = new BNFactory(mapId, {
          "id": "map",
          "options": {
            logo: false,
            slider: false,
          }
        });
        console.log(BNMap.spatialReference, '投影')
        BNMap.bindEvent(null, "load", function () {
          BNmapUtil = new BNFactory("BNmapUtil", BNMap);
          console.log(x, y, 'xy')
          BNmapUtil.toLatLngTransformMapXY([[x, y]], BNMap.spatialReference, 4326, function (data) {
            // 获取坐标
            var zdy = '<div style="padding: 20px 30px;">x：' + data[0].x + ' y:' + data[0].y + '</div>'
            // 弹窗形式展示
            onclickLayui(zdy);
          }, function () {
            alert();
          });
        });
      });

  </script>
</body>

</html>